from django.conf.urls import url
from . import views

urlpatterns = [
    # url(r'^admin/', admin.site.urls),

        # as_view() 功能将字符串转化为 函数
    url(r'^register/$', views.registerview.as_view(),name="register"),
    #   输入过程中判断姓名是否存在           正则表达式提取参外加小括号，视图函数需要接收此参数
    url('^usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$', views.UsernameCountView.as_view()),
    # 判断手机号码是否存在
    url('^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view()),

]
